package com.ttx.springmvc.example.config;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * @author TimFruit
 * @date 2019/7/30 9:33
 */

//fixme java配置无效 
//@Configuration
//@EnableWebMvc
public class WebLoginInterceptorConfig extends WebMvcConfigurerAdapter {

    @Override public void addInterceptors(InterceptorRegistry registry) {
        System.out.println("xxxxxxxxxxxxx注册拦截器");
        registry.addInterceptor(new UserLoginInterceptor()).addPathPatterns("/config/login");
    }
}
